package com.dx.wx.service.impl;

import com.dx.wx.service.DxMediaService;
import com.dx.wx.util.DxUtil;
import com.ejlchina.data.Mapper;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;

@Service
public class DxMediaServiceImpl implements DxMediaService {

    @Override
    public Mapper upload(MultipartFile file) {
       return DxUtil.upload(file);
    }

    @Override
    public void download(String mediaId,HttpServletResponse response) {
        DxUtil.download(response,mediaId);
    }
}
